$OpenBSD: patch-build_config_compiler_BUILD_gn,v 1.7 2017/04/28 14:21:00 robert Exp $
--- build/config/compiler/BUILD.gn.orig.port	Thu Apr 27 19:58:01 2017
+++ build/config/compiler/BUILD.gn	Thu Apr 27 22:56:36 2017
@@ -36,7 +36,7 @@ declare_args() {
   # only two architectures that are currently checked in). Turn this off when
   # you are using a custom toolchain and need to control -B in cflags.
   linux_use_bundled_binutils =
-      linux_use_bundled_binutils_override && is_linux &&
+      linux_use_bundled_binutils_override && (is_linux && !is_openbsd) &&
       (current_cpu == "x64" || current_cpu == "x86")
   binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin",
                               root_build_dir)
@@ -214,7 +214,7 @@ config("compiler") {
 
     # Linker warnings.
     if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") &&
-        !(is_android && use_order_profiling) && !is_mac && !is_ios) {
+        !(is_android && use_order_profiling) && !is_mac && !is_ios && !is_openbsd) {
       # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
       # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1
       # crbug.com/485542
@@ -314,7 +314,7 @@ config("compiler") {
       "-Wl,-z,relro",
     ]
     if (!using_sanitizer) {
-      if (!use_cfi_diag) {
+      if (!use_cfi_diag && !is_openbsd) {
         ldflags += [ "-Wl,-z,defs" ]
       }
 
@@ -1104,7 +1104,7 @@ config("default_warnings") {
         "-Wno-block-capture-autoreleasing",
 
         # TODO(hans): https://crbug.com/681136
-        "-Wno-unused-lambda-capture",
+        # "-Wno-unused-lambda-capture",
 
         # TODO(thakis ): https://crbug.com/683349
         "-Wno-user-defined-warnings",
@@ -1647,7 +1647,7 @@ config("symbols") {
         "-g2",
       ]
     } else {
-      cflags = [ "-g2" ]
+      cflags = [ "-g0" ]
     }
     if (use_debug_fission) {
       cflags += [ "-gsplit-dwarf" ]
